<?php

// Custom Routes
// --------------------------------------------------
router::setRule( 'twitterAPI',      'tweets/show',    'twitter/show', 'module');
router::setRule( 'board-portal',    'board-of-directors/portal',    'portal/login' );
router::setRule( 'board-login',     'board-of-directors/login',     'portal/verify' );
router::setRule( 'board-protected', 'board-of-directors/resources', 'portal/resources' );
router::setRule( 'board-logout',    'board-of-directors/logout',    'portal/logout' );
router::setRule( 'board-member',    'people/board-of-directors/!slug', 'profile/show/slug/$slug/data/board-of-directors.json' );
router::setRule( 'staff',           'staff/!slug',                     'profile/show/slug/$slug/data/staff.json' );
router::setRule( 'communitynews',    'news/community/:page/:limit', 'blog/show/dir/news:community/page/$page/limit/$limit' );
router::setRule( 'communitynewsitem','news/community/!id',          'blog/post/dir/news:community/id/$id' );
// router::setRule( 'docs', 'docs/:page/:limit', 'blog/show/dir/docs/page/$page/limit/$limit' );

// Site config
// --------------------------------------------------
c::set( 'site.title', 'Renew Our Community' );
c::set( 'site.author', 'Renew Our Community' );
c::set( 'site.description', 'Renew Our Community is a ministry in Rock Hill, SC that seeks to renew our community by engaging the Church in ministry with our community.' );
c::set( 'page.description', 'Renew Our Community is a ministry in Rock Hill, SC that seeks to renew our community by engaging the Church in ministry with our community.' );
c::set( 'site.keywords', 'renew, community, rock hill, sc, south carolina, ministry, church, assistance' );
c::set('date.format', 'l, M jS, Y');

c::set( 'roc-hours-of-operation', array(
	'time' => array('10 AM', '4 PM'),
	'day'  => array('Monday', 'Saturday')
));
c::set( 'roc-location', array(
    'street' => '119 E. White Street',
    'city'   => 'Rock Hill',
    'state'  => 'SC',
    'zip'    => '29730'
));
c::set( 'roc.emporium.phone', '(803) 366-8928' );
c::set( 'roc-emporium-location', array(
    'street' => '546 South Cherry Road',
    'city'   => 'Rock Hill',
    'state'  => 'SC',
    'zip'    => '29732'
));
c::set('roc.emporium.hours', array(
    'Monday&mdash;Friday, 10 AM&mdash;5:30 PM',
    'Saturday, 9 AM&mdash;2 PM'
));
c::set('roc.emporium.manager', 'Donald Catha');

c::set('portal-password', 'c47bd37a3bd976f8ee37591c3d2bd3c3');

c::set('twitter.accessToken', 'AAAAAAAAAAAAAAAAAAAAAGR9RQAAAAAA4%2BG27xNzf0AM5BaG7hzbLUT6OLI%3DiqGYjz6v6a7PZ9ERHSnJgY93faYwEhO9gxkKKye4');

//
// Theme
// --------------------------------------------------
c::set( 'theme', 'roc-theme' );

// 
// Functions
// --------------------------------------------------
function ROCdate($string, $return=true) {
    // take a date string and spit out a formatted date
    $date = date(c::get('date.format'), strtotime($string));
    // if $return, then send the string back
    if($return) return $date;
    // else print it
    else echo $date;

    return true;
}
